package com.lzy.principles.demo4;

/**
 * @ClassName: Client
 * @Description: 合成复用原则
 * @Author: LiuZy
 * @Date: 2022/4/9 18:42
 * @Version: 1.0
 */
public class Client {

    public static void main(String[] args) {
        Car car = new ElectricCar();
        car.setColor(new Red());
        car.move();

        car.setColor(new White());
        car.move();
    }

}